import Vue from 'vue';
import VueRouter from 'vue-router';
// import axios from 'axios';
import './cube-ui';
import App from './App.vue';

import seller from 'components/seller/seller';
import goods from 'components/goods/goods';
import ratings from 'components/ratings/ratings';
import 'common/stylus/index.styl';

Vue.config.productionTip = false;
Vue.use(VueRouter);
// Vue.prototype.$axios = axios;

const routes = [
  { path: '/', redirect: '/goods' },
  { path: '/goods', component: goods },
  { path: '/seller', component: seller },
  { path: '/ratings', component: ratings }
];
const router = new VueRouter({
  routes
});

new Vue({
  render: h => h(App),
  router,
  data: {
    eventHub: new Vue()
  }
}).$mount('#app');

// router.go('/goods');
router.getMatchedComponents('/goods');
